<template>
	<!-- 专题专栏 -->
	<div class="public_content bg-color-gray9">
		<div class="bg-color-white boxsize-b p-15">
			<div class="special_nav" v-for="(item,index) in seminarList">
				<router-link :to="{path: `/seminar-detail/${item.id}`}">
					<img :src="item.image" class="special_nav_img" :alt="item.name">
					<!-- <img src="~@/assets/img/5ad0558815fdd.jpg" class="special_nav_img" alt="专题专栏"> -->
				</router-link>
			</div>
		</div>
  </div>
</template>

<script>
  export default {
    data() {
    	return {
			seminarList:[]
    	}
    },
	mounted() {
		this.init();
	},
	methods: {
		init(){
			//console.log(this.GLOBAL.BASE_URL)  //获取global中的全局变量
			this.$parent.$data.current = 2;
			this.getSeminarList()  //所有专题列表
		},
		//专题列表
		getSeminarList(){
			this.$axios.get(`web/subject/listAll`).then(res => {
				if(res.data && res.data.code === 0){
					this.seminarList = res.data.data
					
				}else {
					this.$message.error(res.data.msg)
				}		
			})
		}
    }
  }
</script>

<style scoped>
	.public_content{
    box-sizing: border-box;
    width: 1200px;
    margin: 10px auto;
    padding: 0 16px;
    margin-bottom: 30px;
    border-radius: 3px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    background-color: #f8f4eb;
	}
	.special_nav{
    width: 1034px;
    height: 300px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}
.special_nav_img{
    width: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
</style>